<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html 
	xmlns="http://www.w3.org/1999/xhtml" 
	xmlns:lift="http://liftweb.net/"
    xml:lang="eng">
 
 	<head>
    	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>

		<link rel="icon" 
		      type="image/png" 
		      href="/images/favicon.png"/>
		
		<title>ESME: The Enterprise Social Messaging Experiment</title>
	    
		<lift:Style.header />

		<!--[if lt IE 7]>
		<script src="/scripts/IE7.js" type="text/javascript"></script>
		<![endif]-->
	    
		<script src="/scripts/jquery.js" type="text/javascript"/>
		<script src="/scripts/jquery.scrollTo.js" type="text/javascript"/>
	    <script src="/scripts/json2.js" type="text/javascript"/>

		<script type="text/javascript">

		// <![CDATA[
			
			var currentConvNumber = 0;
			
			$(function(){
				$('#reply-to-div').hide();
				$('#textdude').focus();
			})
			

			function setReplyTo(id, text) {
			  currentConvNumber = id;
			  $('#reply-to-div').fadeIn("fast");
			  if(text.length > 150){
				text = text.substring(0,150) + "...";
			  }	
			  $('#reply-to').text(text);
			  scroll(0,0);	
			  $('#textdude').focus();
			}

			function clearReplyTo() {
			  currentConvNumber = 0;
			  $('#reply-to-div').fadeOut("fast");
			  $('#textdude').focus();
			}

			// ]]>
	
		</script>
	
	
	</head>

  	<body>

		<div class="title-bar-back">
			<div class="title-bar">
				<ul id="menu" class="mainmenu">
					  <li><lift:Menu.item name="Home">Messages</lift:Menu.item></li>
					  <li id="contactsmenu"><lift:Menu.item name="list_users">Contacts</lift:Menu.item></li>
					  <li><lift:Menu.item name="EditUser">Settings</lift:Menu.item></li>
					  <li><lift:Menu.item name="Logout"/></li>
				</ul>
			</div>
		</div>

		
		<div class="send-message-box">
			<div class="current-user">
				<p class="send-message-p"><lift:UserSnip.image /></p>
				<p class="current-userp"><lift:UserSnip.name /></p>
			</div>

			<lift:UserSnip.postScript />

			<div class="send-msg-text">
				<p class="send-message-p"><label>What are you working on?</label></p>
				<textarea rows="5" cols="60" id="textdude" />
				<div class="send-msg-button">
					<a href="javascript:post_msg();">
						<img src="/images/send-msg-trans.png" alt=""/>
					</a>
				</div>
			</div>
			
			<div class="send-msg-tags">
				<p class="send-message-p"><label>Tag your Message:</label></p>
				<textarea rows="5" cols="27" id="tagdude" />
				<p class="send-message-p">(comma separated, optional)</p>
			</div>
			
			<div id="reply-to-div" visible="false">
		      <p class="send-message-p"><b>Reply to:</b></p> 
			  <p id="reply-to"></p>
			  <p class="clearctrl"><a href="javascript:clearReplyTo()">clear</a></p>
		    </div>
			
		</div>	

		<div class="bottom-box">
			<div class="messages-box">
				<lift:bind name="content" />
			</div>
			<div class="sidebar">
				<div class="rhs-menu">
					<p><lift:Menu.item name="trackMgt">Setup Tracking</lift:Menu.item></p>
					<p><lift:Menu.item name="actionMgt">Setup Actions</lift:Menu.item></p>
					<p><lift:Menu.item name="authToken">Setup Tokens</lift:Menu.item></p>
					<p><a href="http://esmeproject.googlecode.com/files/ESMEDesktop_v0.012.air">Get ESMEDesktop</a></p>
				</div>
				
				<lift:comet type="TagCloud"/>
					
				<div class="search-box">
				   <p class="heading">SEARCH MESSAGES</p>	
				   <form id="schform" action="/user_view/search">
						 <input name="term" class="search-text"/>
			 		     <img onclick="document.getElementById('schform').submit()" 
							  src="/images/search.jpg" alt="Search"
							  class="search-btn"/>
		 		   </form>
				</div>

			</div>
		</div>


  	</body>
</html>
